home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Template / DLL / MakeDLL < prev    next >
Text File  |  1995-07-08  |  3KB  |  142 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.ClearAll    \
  4.             o.Clone    \
  5.             o.Delete    \
  6.             o.Find    \
  7.             o.Free    \
  8.             o.Init    \
  9.             o.LinkSprite    \
  10.             o.LoadFile    \
  11.             o.UseOutFont    \
  12.             o.UseSprite    \
  13.  
  14.  
  15. LibName        =    Template
  16.  
  17.  
  18.  
  19. # Template makefile to make Straylight Dynamic Link 
  20. # Library from a DeskLib sublibrary's .o files
  21. #
  22. # The DLL is made in the directory 
  23. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  24. # and has the same name as the DeskLib sublibrary.
  25. #
  26. # Julian Smith 17 Apr 1995.
  27.  
  28. # The macro $(ObjectFiles) should be set at the 
  29. # start of this file, to be a space-separated
  30. # list of object files.
  31. # This is done by 'Makatic'.
  32.  
  33. # The macro $(LibName) should also be set at the 
  34. # start of this file, to be the name of the 
  35. # DeskLib sublibrary.
  36. # This is done by 'Makatic'.
  37.  
  38. # Note that this makefile doesn't use cc at all
  39. # - it merely links existing .o files.
  40.  
  41. # Linker flags, These can be anything. 
  42. # All flags required by Straylight (eg Link -rmf) 
  43. # are included in the $(LINK) macro.
  44. #
  45. LinkFlags    =    $(LinkExtra)
  46.  
  47.  
  48. # Macros for commands, including the Straylight
  49. # tool 'cdll'. Note that DRLink doesn't seem to
  50. # work with the SDLS.
  51. #
  52. LINK        =    Link -rmf
  53. CDLL        =    cdll
  54.  
  55.  
  56. # Filename of the thing we need to make: - the main
  57. # dynamically-linked library, which will go in the 
  58. # !DLL application.
  59. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  60. # application) should be the same as the 'name' field in the
  61. # $(DLL_Def) file. In this case, this is $(LibName).
  62. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  63.  
  64.  
  65. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  66. #
  67. DLL_Header    =    Header
  68. DLL_Def        =    ^.DLLDef
  69. DLL_Stubs    =    Stubs
  70.  
  71.  
  72.  
  73. # -------------------------------------------------------
  74. # Everything below here should probably not be changed...
  75. # -------------------------------------------------------
  76.  
  77.  
  78. # Extra libs, written by Straylight, which always need to be linked into a DLL
  79. #
  80. SDLS_ExtraObjects=                    \
  81.             C:DLLLib.o.DLLLib        \
  82.             C:DLLLib.o.dstubs        \
  83.  
  84.  
  85. # Extra DeskLib libraries which need to be linked into the final DLL.
  86. # The DLL DeskLib library is included here because some DeskLib DLLs may
  87. # refer to other DeskLib DLLs.
  88. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  89. # the sublibraries for which there is a DLL - just the DLL Stubs file
  90. # is included for these.
  91. #
  92. DeskLib_ExtraObjects=                \
  93.             DeskLib:o.DLLDLL    \
  94.  
  95.  
  96.  
  97.  
  98. #Here's what we want to make...
  99.  
  100. All:    $(DLL_Lib)
  101.  
  102. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  103.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  104.  
  105.  
  106.  
  107. # Here's how to make the things which are needed in the above rules
  108.  
  109. $(DLL_Def):    
  110.     | Error: No DLL definition file exists.
  111.     |        You should run th MkStubsOs makefile
  112.     |        and then alter the template Def
  113.     |        file by hand.
  114.  
  115. $(DLL_Header):    $(DLL_Def)
  116.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  117.  
  118.  
  119. # Rule for compiling C source code for a Straylight dynamically-linked library.
  120. # Actually, we don't call cc - we complain and tell the user to run the 
  121. # MkStubsOs makefile.
  122.  
  123. VPATH = @.^
  124.  
  125. .SUFFIXES:    .o .c .s
  126. .c.o:
  127.     | $@ needs recompiling. This should be done by
  128.     | running the MkStubsOs or MkOs makefile before running
  129.     | this makefile.
  130.     |
  131.  
  132. .s.o:
  133.     | $@ needs assembling. This should be done by
  134.     | running the MkStubsOs or MkOs makefile before running
  135.     | this makefile.
  136.     |
  137.  
  138.  
  139.  
  140. # Dynamic dependencies:
  141.